/**
 * 
 */
package com.itinsys.enma.manager;

import java.sql.Date;
import java.util.List;
import java.util.Map;

import com.itinsys.enma.domain.DailyReservation;
import com.itinsys.enma.domain.PlanningReservation;
import com.itinsys.enma.domain.Reservation;
import com.itinsys.enma.domain.response.DailyReservationResponse;
import com.itinsys.enma.exception.reservation.ReservationExistsException;

/**
 * @author pferraz
 *
 */
public interface ReservationManager {

	List<PlanningReservation> getAllReservations();

	PlanningReservation getReservationById(long id) throws ReservationExistsException;

	boolean addReservation(PlanningReservation r, String recType,int eventLength,Map<String, String> recTimeByDay,String schoolId);
	
	void updateReservation(PlanningReservation r, String recType,int eventLength,Map<String, String> recTimeByDay, String schoolId);

	List<PlanningReservation> getByPlanningId(int id) throws ReservationExistsException;

	boolean deleteReservation(PlanningReservation r);
	
	boolean deleteReservation(DailyReservation r);

	DailyReservationResponse checkDailyReservation(DailyReservation r,String userName);

	void addDailyReservation(DailyReservation r, String recType, int eventLength);
	
	void updateReservation(DailyReservation r, String recType,int eventLength);

	List<DailyReservation> getDailyResBetweenDatesByUserName(String userName,Date startDate,Date endDate);

	List<DailyReservation> getDailysBetweenDates(Date startDate,Date endDate);
	
//	List<DailyReservation> getDailyResByUserName(String userName);
//
//	List<DailyReservation> getAllDailys();

	List<PlanningReservation> getReservationsToStart(String date);
	
	void directUpdate(Reservation r);

	List<PlanningReservation> getReservationsToEnd(String date);

	boolean allReservationsDisable(int plannId);

	PlanningReservation getByEnvironmentId(int id);

	List<DailyReservation> getReservationsByEnvironment(int environmentId);

}
